/*
 *  See http://blog.learnboost.com/blog/a-css3-overlay-system/
 */

body.overlaid {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
div.overlay {
    display: none;
    position: fixed; top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);

    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
}
body.overlaid div.overlay {
  display: block;
}
div.overlay > div.wrap-outer {
      position: relative;
      width: 100%;
      height: 100%;

      display: -moz-box;
      display: -webkit-box;

      -webkit-box-orient: horizontal;
      -moz-box-orient: horizontal;
      -ms-box-orient: horizontal;

      -webkit-box-align: stretch;
      -moz-box-align: stretch;
      -ms-box-align: stretch;

      -webkit-box-pack: center;
      -moz-box-pack: center;
      -ms-box-pack: center;
}
div.overlay > div.wrap-outer > div.wrap {
      	display: -webkit-box;
      	display: -moz-box;
      	
      	-webkit-box-orient: vertical;
      	-moz-box-orient: vertical;
      	-ms-box-orient: vertical;

      	-webkit-box-align: stretch;
      	-moz-box-align: stretch;
      	-ms-box-align: stretch;

      	-webkit-box-pack: center;
      	-moz-box-pack: center;
      	-ms-box-pack: center;
}
div.overlay > div.wrap-outer > div.wrap > * {
  	-webkit-box-flex: 0;
   	-moz-box-flex: 0;
   	-ms-box-flex: 0;

   	display: block;
}

.dialog {
    width: 45em;
    background: #fff;
    resize: both;
    overflow: auto;
    border-radius: 10px;
    padding: 15px;

    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;

    box-shadow: 0 3px 6px rgba(0,0,0,1);
    -webkit-box-shadow: 0 3px 6px rgba(0,0,0,1);
}
.dialog h1 {
  font-size: 1.5em;
}
.dialog input:not([type='submit']), .dialog select {
    resize: none;
    font-size: 1.3em;
    margin-left: 0.5em;
}
.dialog label:not(:first-of-type) {
    margin-left: 1em;
}
.dialog table {
    display: inline-table;
    margin: 1em;
}
.dialog table td, .dialog table th {
    padding: 3px;
	}
.dialog table td[data-count="1"] {
    background: hsl(120, 100%, 85%);	
}
.dialog table td[data-count="2"] {
    background: hsl(120, 100%, 75%);	
}
.dialog table td[data-count="3"] {
    background: hsl(120, 100%, 65%);	
}
.dialog table td[data-count="4"] {
    background: hsl(120, 100%, 55%);	
}
.dialog table td[data-count="5"] {
    background: hsl(120, 100%, 45%);	
}